<template>
  <div>
    <div class="al-box-container">
      <ALImage :src="userInfo.avatar" round class="al-width-50"/>

      <div>
        {{userInfo.nickname}}
      </div>

      <div class="al-flex-wrap al-flex-justify-space-around">
        <!-- 显示性别 -->
        <div>
          <div v-if="userInfo.gender == 1">
            <span class="el-icon-male al-text-color-light-blue"></span>
            <span>男</span>
          </div>

          <div v-if="userInfo.gender == 0">
            <span class="el-icon-male al-text-color-light-pink"></span>
            <span>女</span>
          </div>
        </div>

        <div class="al-box-size-20px"></div>
        <!-- 显示身份 -->
        <div v-if="userInfo.identity == 1">
          <span class="el-icon-user al-text-color-light-blue"></span>
          <span>摄影师</span>
        </div>

        <div v-if="userInfo.identity == 2">
          <span class="el-icon-user al-text-color-light-blue"></span>
          <span>模特</span>
        </div>

        <div v-if="userInfo.identity == 3">
          <span class="el-icon-user al-text-color-light-blue"></span>
          <span>普通用户</span>
        </div>
      </div>

      <div style="width: 50%" class="al-m-top-20px">
        <div class="al-show-border-light-blue al-border-capsule capsule-btn-hover al-box-container al-cursor-pointer">
          <span class="al-font-weight-500" @click="goPage('/user/profile/' + userInfo.id)">查 看</span>
        </div>
      </div>
    </div>


  </div>

</template>

<script>
  import ALImage from "./ALImage";

  export default {
    name: "UserInfoCard",
    //组件
    components: {ALImage},
    //属性
    props: {
      userInfo: {
        type: Object,
        default: undefined,
        children: {}
      },

      avatar: {
        type: String,
        default: 'https://alanlee-panda-appointment.oss-cn-shenzhen.aliyuncs.com/images/chahua/undraw_profile_pic_ic5t.png',
      }
    },

    //数据
    data() {
      return {}
    },

    //挂载完成时
    mounted() {

    },

    //方法
    methods: {
      goPage(path){
        this.gotoPage(path);
      }
    },

    //计算属性
    computed: {},

    //监听
    watch: {}
  }
</script>

<style scoped>
  .capsule-btn-hover:hover {
    color: white;
    border: none;
    background-image: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);

  }
</style>
